package com.beans;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Component;

@Component
public class BeanScope {
    @Autowired
    User User3;

    public User getUser(){
        User user = User3;
        user.setId(1);
        user.setName("悟空");
        return user;
    }
}
